<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<link href="/ajax/libs/datapicker/datepicker3.css"
	th:href="@{/ajax/libs/datapicker/datepicker3.css}" rel="stylesheet" />
<link href="/ajax/libs/iCheck/custom.css"
	th:href="@{/ajax/libs/iCheck/custom.css}" rel="stylesheet" />
<link href="/ajax/libs/select/select2.css"
	th:href="@{/ajax/libs/select/select2.css}" rel="stylesheet" />
	<style>
	  .form-group .address{width:22%;}
	</style>
<body class="gray-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
		<form class="form-horizontal m" id="form-order-editFollow">
			<input id="orderId" name="orderId" th:value="${order.orderId}"
				type="hidden">
			<!-- <div class="form-group">
				<label class="col-sm-3 control-label">订单号：</label>
				<div class="col-sm-8">
					<input id="orderNum" name="orderNum" th:value="${order.orderNum}"
						class="form-control" type="text">
				</div>
			</div> -->
			<input id="clueId" name="clueId" th:value="${order.clueId}" type="hidden">
			<input id="clueSource" name="clueSource" th:value="${order.customerClue.clueSource}" type="hidden">
			<input id="typeId" name="typeId" th:value="${order.customerClue.typeId}" type="hidden">
			<input id="isHandle" name="isHandle" th:value="${order.customerClue.isHandle}" type="hidden">
			<div class="form-group">
				<label class="col-sm-3 control-label">姓名：</label>
				<div class="col-sm-8">
					<input id="customerName" name="customerName"
						th:value="${customerClue.customerName}" class="form-control"
						type="text" onblur="this.value=this.value.match(/^[\u4e00-\u9fa5]{2,4}$/)">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">手机号：</label>
				<div class="col-sm-8">
					<input id="customerCellphone" name="customerCellphone"
						th:value="${order.customerClue.customerCellphone}"
						class="form-control" type="text" maxlength="11"
						onblur="Tel(this,this.value)">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">年龄：</label>
				<div class="col-sm-8">
					<input id="customerAge" name="customerAge"
						th:value="${order.customerClue.customerAge}" class="form-control"
						type="text" maxlength="2" onkeyup="this.value=this.value.match(/^[1-9]{1}[0-9]*$/)">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">产品名称：</label>
				<div class="col-sm-8">
					<select class="form-control" name="productType" id="productType">
						<option th:value="${order.customerClue.productType}"
							th:text="${order.customerClue.productType} == '' ? 请选择 :${order.customerClue.productType}"
							selected="selected" disabled="disabled"></option>
						<option th:each="productType : ${productTypeList}"
							th:value="${productType.dictCode}"
							th:text="${productType.dictLabel}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">
			<input name="customerJobs" th:value="${customerClue.customerJob}" type="hidden">
				<label class="col-sm-3 control-label">工作：</label>
				<div class="col-sm-8">
					<select class="form-control" name="customerJob" id="customerJob">
						<option th:value="${customerClue.customerJob}"
							th:text="${customerClue.customerJob} == '' ? 请选择 :${order.customerClue.customerJob}"
							selected="selected" disabled="disabled"></option>
						<option th:each="job : ${jobList}" th:value="${job.dictLabel}"
							th:text="${job.dictLabel}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">电话号码：</label>
				<div class="col-sm-8">
					<input id="customerPhone" name="customerPhone"
						th:value="${order.customerClue.customerPhone}"
						class="form-control" type="text" maxlength="13" onblur="isTel(this,this.value)">
				</div>
			</div>

			<div class="form-group">
			             <input name="customerBackgrounds" th:value="${customerClue.customerBackground}" type="hidden">
				<label class="col-sm-3 control-label">客户背景：</label>
				<div class="col-sm-8">
					<select class="form-control" name="customerBackground"
						id="customerBackground">
						<option th:value="${customerClue.customerBackground}"
							th:text="${customerClue.customerBackground} == '' ? 请选择 :${order.customerClue.customerBackground}"
							selected="selected" disabled="disabled"></option>
						<option th:each="background : ${backgroundList}"
							th:value="${background.dictLabel}"
							th:text="${background.dictLabel}"></option>
					</select>
				</div>
			</div>
        
            <div class="form-group">
               <label class="col-sm-3 control-label">性别：</label>
                <div class="col-sm-8">
                    <div class="radio radio-success radio-inline">
                        <input type="radio" id="customerSex" name="customerSex" value="1"
                            th:field="*{customerClue.customerSex}"> <label for="radio2">男</label>
                    </div>
                    <div class="radio radio-danger radio-inline">
                        <input type="radio" id="customerSex" name="customerSex" value="2"
                            th:field="*{customerClue.customerSex}"> <label for="radio3">女</label>
                    </div>
                </div> 
            </div>
          
			<div class="form-group">
				<label class="col-sm-3 control-label">出生日期：</label>
				<div class="col-sm-9">
					<div class="form-group">
						<div class="input-group date">
							<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
							<input name="customerBirth" type="text" class="form-control"
								th:value="${order.customerClue.customerBirth}"
								value="2018-05-20">
						</div>
					</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">身份证号：</label>
				<div class="col-sm-8">
					<input id="customerIdentityNum" name="customerIdentityNum"
						th:value="${order.customerClue.customerIdentityNum}"
						class="form-control" type="text" onblur="isCardNo(this,this.value)">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">微信号：</label>
				<div class="col-sm-8">
					<input id="customerWechatAccount" name="customerWechatAccount"
						th:value="${order.customerClue.customerWechatAccount}"
						class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">紧急联系人：</label>
				<div class="col-sm-8">
					<input id="customerEmergencyContact"
						name="customerEmergencyContact"
						th:value="${order.customerClue.customerEmergencyContact}"
						class="form-control" type="text" onblur="this.value=this.value.match(/^[\u4e00-\u9fa5]{2,4}$/)">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">紧急联系人号码：</label>
				<div class="col-sm-8">
					<input id="customerEmergencyCellphone"
						name="customerEmergencyCellphone"
						th:value="${order.customerClue.customerEmergencyCellphone}"
						class="form-control" type="text" maxlength="13" onblur="Tel(this,this.value)">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">客户地址：</label>
				<div class="col-sm-3 address">
					<select name="customerProvince" id="input_province"
						class="form-control">
						<option th:text="${order.customerClue.customerProvince}"></option>
					</select>
				</div>
				<div class="col-sm-3 address">
					<select name="customerCity" id="input_city" class="form-control">
						<option th:text="${order.customerClue.customerCity}"></option>
					</select>
				</div>
				<div class="col-sm-3 address">
					<select name="customerArea" id="input_area" class="form-control">
						<option th:text="${order.customerClue.customerArea}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">详细地址：</label>
				<div class="col-sm-8">
					<input id="customerAddressDetail" name="customerAddressDetail"
						th:value="${order.customerClue.customerAddressDetail}"
						class="form-control" type="text">
				</div>
			</div>

			<div class="form-group">
				<div class="col-sm-8 col-sm-offset-3">
					<button type="submit" class="btn btn-primary">提交</button>
				</div>
			</div>
			</form>
	</div>
	<div th:include="include::footer"></div>
	<script src="/azxcrm/module/order/editFollow.js"
		th:src="@{/azxcrm/module/order/editFollow.js}">
		
	</script>

	<script src="/js/jquery-ui-1.10.4.min.js"
		th:src="@{/js/jquery-ui-1.10.4.min.js}"></script>
	<script src="/ajax/libs/iCheck/icheck.min.js"
		th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
	<script src="/ajax/libs//datapicker/bootstrap-datepicker.js"
		th:src="@{/ajax/libs//datapicker/bootstrap-datepicker.js}"></script>
	<script src="/ajax/libs/beautifyhtml/beautifyhtml.js"
		th:src="@{/ajax/libs/beautifyhtml/beautifyhtml.js}"></script>
	<script src="/ajax/libs/iCheck/icheck.min.js"
		th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
	<script src="/ajax/libs/select/select2.js"
		th:src="@{/ajax/libs/select/select2.js}"></script>
	<script>
		$(".input-group.date").datepicker({
			todayBtn : "linked",
			keyboardNavigation : !1,
			forceParse : !1,
			calendarWeeks : !0,
			autoclose : !0
		});
		//身份证验证
		function isCardNo(obj,card) { 
		    var reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/; 
		    if(reg.test(card) === false)  {        
		    	 layer.msg('请输入正确的身份证号码')
		    } 
		}

		//固定电话
		function isTel(obj,card){
		    var reg = /^(\(\d{3,4}\)|\d{3,4}-)?\d{7,8}$/; 
		     if(reg.test(card) === false)  {        
		    	 layer.msg('请输入正确的电话号码')
		     } 
		}
	    function Tel(obj,val){
	        var myreg=/^[1][3,4,5,7,8][0-9]{9}$/;
	        if(!myreg.test(val)){
	          layer.msg('请输入正确的手机号码')
	        }else{
	          return true;
	        }
	      }
	</script>
	<script src="/js/address.js" th:src="@{/js/address.js}"></script>
	<script src="/azxcrm/module/order/editFollow.js"
		th:src="@{/azxcrm/module/order/editFollow.js}">
	</script>
</body>
</html>
